# 常量
PI = 3.14152945


# 方法
def getperimeter(r: float):
    return 2 * PI * r


def getarea(r: float):
    return PI * r * r


def output():
    # 循环
    while True:
        radius = input("请输入半径:")
        try:
            rad = float(radius)
            return rad
        except:
            print("输入有误")


def yearDays1():
    # """    1  2      3  4  5  6  7  8  9  10  11  12
    #        31 28(29) 31 30 31 30 31 31 30 31  30  31
    #        瑞年：4年一闰100年不闰400年一闰
    # """
    year = int(input("请输入年份："))
    month = int(input("请输入月份: "))
    if month in [1, 3, 5, 7, 8, 10, 12]:
        days = 31
    elif month in (4, 6, 9, 11):
        days = 30
    else:
        if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0:
            days = 28
        else:
            days = 29
    print("%d年%d月：%d天" % (year, month, days))


# 主入口
if __name__ == '__main__':
    r = output()
    print("圆的周长：%.2f" % getperimeter(r))
    print("圆的买面积：", getarea(r))
    print("圆的买面积：", getarea(r))

    if 100:
        print("if 100 能执行")

# 输入某年月，判断有多天
"""方法1"""
yearDays1()
